<div bsModal #createOrEditModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{ backdrop: 'static' }">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title"><span>同名工规</span></h4>
        <button type="button" class="close" (click)="close()" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">

        <div class="row align-items-center">
          <!-- <Primeng-TurboTable-Start> -->
          <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
            <p-table #dataTable  [value]="primengTableHelper.records" 
            rows="{{primengTableHelper.defaultRecordsCountPerPage}}" [paginator]="false" [lazy]="true"
            [scrollable]="true" ScrollWidth="100%" [responsive]="primengTableHelper.isResponsive"
            [resizableColumns]="primengTableHelper.resizableColumns">
              <ng-template pTemplate="header">
                <tr>
                  <th>
                    {{ l('Actions') }}
                  </th>
                  <th>编号</th>
                  <th>名称</th>
                  <th>型号</th>
                  <th>图号</th>
                  <th>图号名称</th>
                </tr>
              </ng-template>
              <ng-template pTemplate="body" let-record="$implicit">
                <tr>
                  <td>
                    <div class="btn-group dropdown" dropdown container="body">
                      <button dropdownToggle class="dropdown-toggle btn btn-sm btn-primary">
                        <i class="fa fa-cog"></i><span class="caret"></span> {{"Actions" | localize}}
                      </button>
                    
                      <ul class="dropdown-menu" *dropdownMenu >
                        <li *ngIf="record.status === 2"><a (click)="cancelCar(record)">取消</a></li>
                        <li *ngIf="record.status === 1"><a (click)="goCar(record, 2)">加入借出车</a></li>
                        <li *ngIf="record.status === 3"><a (click)="goCar(record, 3)">加入归还车</a></li>
                        <li *ngIf="record.status === 3&&isGranted('Pages.TechRuleFileInfo.Manager')"><a 
                            (click)="goCar(record, 5)">加入追回车</a></li>
                        <li *ngIf="record.status === 1&&isGranted('Pages.TechRuleFileInfo.Manager')"><a
                            (click)="goCar(record, 4)">加入报废车</a></li>
                        <li><a (click)="TechRuleLogModal.show(record)">日志</a></li>
                        <li>
                          <a (click)="createOrEditTechRuleModal.show(record.id)"
                            *ngIf="isGranted('Pages.TechRuleFileInfo.Manager')">{{ l('Edit') }}</a>
                        </li>
                        <li>
                          <a (click)="deleteTechRule(record)"
                            *ngIf="isGranted('Pages.TechRuleFileInfo.Manager')">{{ l('Delete') }}</a>
                        </li>
                      </ul>
                    </div>
                  </td>
                
                  <td><span class="ui-column-title"> </span>
                     {{ record.techRuleInfo.fileCode }}
                  </td>
                  <td>
                    <span class="ui-column-title"> 名称</span> {{ record.techRuleInfo.fileName }}
                    <span class="m-badge m-badge--danger">{{ record.statusName }}</span>
                  </td>
                  <td><span class="ui-column-title"> </span>
                     {{ record.techRuleInfo.modelName }}</td>
                  <td><span class="ui-column-title"> </span>
                    {{ record.techRuleInfo.drawingCode }}</td>
                  <td><span class="ui-column-title"> </span>
                    {{ record.techRuleInfo.drawingName }}</td>
                </tr>
              </ng-template>
            </p-table>
          </div>
          <!-- <Primeng-TurboTable-End> -->
        </div>
      </div>
    </div>
  </div>
  <createOrEditTechRuleModal #createOrEditTechRuleModal (modalSave)="getTechRuleSames()"></createOrEditTechRuleModal>
  <editOutOrBackTechRuleModal #editOutOrBackTechRuleModal (modalSave)="getTechRuleSames()"></editOutOrBackTechRuleModal>
  <TechRuleLogModal #TechRuleLogModal></TechRuleLogModal>
</div>